import request from '@/utils/request'

const project = {
  // 科技平台列表
  list (params) {
    return request.get('/kjpt/platformInfo/list', { params });
  },
  // 新增科技平台基本信息
  add (data) {
    return request.post('/kjpt/platformInfo/add', data);
  },
  edit (data) {
    return request.post('/kjpt/platformInfo/update', data);
  },
  submit (data) {
    return request.post('/kjpt/platformInfo/submit', data);
  },
  reportEdit (data) {
    return request.post('/kjpt/platformReport/update', data);
  },
  delete (id) {
    return request.post(`/kjpt/platformInfo/delete/${id}`);
  },
  get (id) {
    return request.get(`/kjpt/platformInfo/detail/${id}`);
  },
  getAll (id) {
    return request.get(`/kjpt/platformInfo/allDetail/${id}`);
    // return request.get(`/kjpt/platformInfo/detail/${id}`);
  },
  // 我的科技平台列表
  myList (params) {
    return request.get(`/kjpt/platformInfo/myList`, { params });
  },
  platformReportList (params) {
    return request.get('/kjpt/platformReport/list', { params });
  },

  // 新增建设单位信息
  constructionUnitAdd (data) {
    return request.post('/kjpt/constructionUnit/add', data);
  },
  constructionUnitUpdate (data) {
    return request.post('/kjpt/constructionUnit/update', data);
  },
  // 获取建设单位信息详情
  constructionUnitDetail (id) {
    return request.get(`/kjpt/constructionUnit/detail/${id}`);
  },
  // 新增立项背景与意义信息
  platformBackgroundAdd (data) {
    return request.post('/kjpt/platformBackground/add', data);
  },
  platformBackgroundUpdate (data) {
    return request.post('/kjpt/platformBackground/update', data);
  },
  // 获取立项背景与意义信息详情
  platformBackgroundDetail (id) {
    return request.get(`/kjpt/platformBackground/detail/${id}`);
  },

  // 新增主要任务信息
  platformMainTaskAdd (data) {
    return request.post('/kjpt/platformMainTask/add', data);
  },
  platformMainTaskUpdate (data) {
    return request.post('/kjpt/platformMainTask/update', data);
  },
  // 获取主要任务信息
  platformMainTaskDetail (id) {
    return request.get(`/kjpt/platformMainTask/detail/${id}`);
  },
  // 新增经费预算信息
  platformBudgetAdd (data) {
    return request.post('/kjpt/platformBudget/add', data);
  },
  platformBudgetUpdate (data) {
    return request.post('/kjpt/platformBudget/update', data);
  },
  // 获取经费预算信息详情
  platformBudgetDetail (id) {
    return request.get(`/kjpt/platformBudget/detail/${id}`);
  },
  getBudgetByPlatformId (id) {
    return request.get(`/kjpt/platformBudget/getByPlatformId/${id}`);
  },
  // 新增（修改）仪器设备经费概算信息
  platformEquipmentAddList (data) {
    return request.post('/kjpt/platformEquipment/addList', data);
  },
  // 根据科技平台id获取仪器设备经费概算信息详情
  getByPlatformId (id) {
    return request.get(`/kjpt/platformEquipment/getByPlatformId/${id}`);
  },

  // 新增建设单位的保障条件与经费配套信息
  platformSafeguardAdd (data) {
    return request.post('/kjpt/platformSafeguard/add', data);
  },
  platformSafeguardUpdate (data) {
    return request.post('/kjpt/platformSafeguard/update', data);
  },
  // 获取建设单位的保障条件与经费配套信息详情
  platformSafeguardDetail (id) {
    return request.get(`/kjpt/platformSafeguard/detail/${id}`);
  },
  getSafeguardByPlatformId (id) {
    return request.get(`/kjpt/platformSafeguard/getByPlatformId/${id}`);
  },
  // 新增（修改）委员会人员信息
  platformMemberAdd (data) {
    return request.post('/kjpt/platformMember/addList', data);
  },
  platformMemberUpdate (data) {
    return request.post('/kjpt/platformMember/update', data);
  },
  platformMemberDelete (id) {
    return request.post(`/kjpt/platformMember/delete/${id}`);
  },
  getPlatformMemberByType (id, type) {
    return request.get(`/kjpt/platformMember/getByPlatformIdAndType/${id}/${type}`);
  },
  getPlatformMemberNoType (id) {
    return request.get(`/kjpt/platformMember/getByPlatformIdAndType/${id}`);
  },
  getPlatformMember (id) {
    return request.get(`/kjpt/platformMember/getByPlatformId/${id}`);
  },

  platformManageOrgAddList (data) {
    return request.post('/kjpt/platformManageOrg/addList', data);
  },
  getManageOrgByPlatformId (id) {
    return request.get(`/kjpt/platformManageOrg/getByPlatformId/${id}`);
  },
  platformManageScienceAddList (data) {
    return request.post('/kjpt/platformManageScience/addList', data);
  },
  getManageScienceByPlatformId (id) {
    return request.get(`/kjpt/platformManageScience/getByPlatformId/${id}`);
  },





  // 平台类别树
  platformCategoryTree () {
    return request.get(`/kjpt/platformCategory/tree`);
  },
  submit (data) {
    return request.post(`/kjpt/platformInfo/submit`, data);
  },
  scoreList (params) {
    return request.get(`/kjpt/platformScore/list`, { params });
  },
  systemTree () {
    return request.get(`/kjpt/platformSystem/tree`);
  },
  addScore (data) {
    return request.post('/kjpt/platformScore/add', data);
  },
  updateScore (data) {
    return request.post('/kjpt/platformScore/update', data);
  },
  deleteScore (id) {
    return request.post(`/kjpt/platformScore/delete/${id}`);
  },
  submitScore (data) {
    return request.post('/kjpt/platformScore/submit', data);
  },
  systemDetail (id) {
    return request.get(`/kjpt/platformSystem/detail/${id}`);
  },
  scoreDetail (id) {
    return request.get(`/kjpt/platformScore/detail/${id}`);
  },
}

export default project;
